package com.luke.exercise.jvm;

import java.util.LinkedList;

public class HeapOOMTest {

    public static void main(String[] args) {
        LinkedList<HeapOOMTest> list = new LinkedList<HeapOOMTest>();
        int i =0;
        while(true) {
            list.add(new HeapOOMTest());
            //System.out.println(i++);
            //"main" java.lang.OutOfMemoryError: GC overhead limit exceeded
        }
    }
}
